<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=<device-width>, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
         <button @click="increase">increase</button>
         <button @click="stop">stop</button>

        <p>{{count}}</p>
    </div>
    <script type="module">
        import {createApp,ref,watchEffect} from './node_modules/vue/dist/vue.esm-browser.js'

        createApp({
            setup(){
                const count = ref(0)
                const increase = ()=>{
                    count.value++
                }

                const stop = watchEffect(()=>{
                    console.log(count.value)
                })

                return {
                    count,
                    stop,
                    increase
                }
            }
        }).mount('#app')
    </script>
</body>
</html>